home *** CD-ROM | disk | FTP | other *** search
- Path: dispatch.news.demon.net!demon!mckean.demon.co.uk
- From: martin@mckean.demon.co.uk (Martin McKean)
- Newsgroups: comp.lang.c++
- Subject: Newbie question re getting local time
- Date: Fri, 05 Apr 1996 16:04:30 GMT
- Message-ID: <3165427c.147901903@news.demon.co.uk>
- NNTP-Posting-Host: mckean.demon.co.uk
- X-NNTP-Posting-Host: mckean.demon.co.uk
- X-Newsreader: Forte Agent .99d/32.182
-
- Can anyone tell me why the following won't work:
-
- int iDay;
- LPSYSTEMTIME gLocalTime;
- GetLocalTime(gLocalTime);
- iDay=gLocalTime.wDay;
-
- As far as I can work out the SYSTEMTIME structure is included, and
- contains the paramater wDay. The compile error I get is:
-
- error C2231: '._SYSTEMTIME::wDay' : left operand points to 'struct',
- use '->'
-
- But if I change refs to gLocalTime.wDay to gLocalTime->wDay it
- compiles, but when debugging it stops at the last line above saying
- "Unhandled exception - Access violation".
-
- All I want is the day of the month; can anyone help?? (MSVC++4)
-
- Thanks,
- Martin
-